home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / VS_804.ARJ / MAINTSRC.EXE / MAINT.DOC < prev    next >
Text File  |  1991-12-03  |  24KB  |  586 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.                        Designing Your Clipper v5.01 Application
  11.  
  12.                                 by Vernon E. Six, Jr.
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.                                    December 3, 1991
  44.  
  45.  
  46.                         CopyRight (c) 1991 by Vernon E. Six, Jr.
  47.                             All Rights Reserved World Wide
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.                                   Table Of Contents
  57.  
  58.           First Things First  . . . . . . . . . . . . . . . . . . . . .   3
  59.  
  60.           Database Dictionaries . . . . . . . . . . . . . . . . . . . .   3
  61.  
  62.           Database Dictionary Maintenance Utility . . . . . . . . . . .   5
  63.  
  64.           Create Database / Edit Header Information . . . . . . . . . .   5
  65.  
  66.           Define Fields . . . . . . . . . . . . . . . . . . . . . . . .   6
  67.  
  68.           Define Indexs . . . . . . . . . . . . . . . . . . . . . . . .   7
  69.  
  70.           Delete Database . . . . . . . . . . . . . . . . . . . . . . .   8
  71.  
  72.           Generate *.CH Files - Preprocessor  . . . . . . . . . . . . .   9
  73.  
  74.           Print Structure . . . . . . . . . . . . . . . . . . . . . . .  12
  75.  
  76.           Renumber  . . . . . . . . . . . . . . . . . . . . . . . . . .  12
  77.  
  78.           Copy  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  12
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.           First Things First
  87.  
  88.           The  first step  to designing  your application  is to  determine
  89.           exactly  what  output you  want your  application  to be  able to
  90.           produce.  This is where the interaction with your end user should
  91.           be the  highest.  You should try to obtain as much information as
  92.           possible relating to the desired reports, etc.
  93.  
  94.           After you have determined what  the output requirements are,  you
  95.           should  try to  determine what  data is  necessary to  obtain the
  96.           desired output.  As  you are collecting this information,  try to
  97.           break  the various  pieces  into logical  groups.   For  example:
  98.           logical  groups  for  an  accounts  receivable  system  would  be
  99.           customers,  invoices, payments,  purchases,  etc.   This step  is
  100.           crucial for it is only through  this process that you can develop
  101.           your actual DBF file structures, index keys, etc.
  102.  
  103.           After you have broken the data into logical groups, try to define
  104.           the  relationships  between  the  various groups.    Example:  An
  105.           invoice has a relationship to the customer file because we surely
  106.           would want to know to whom we sold something.
  107.  
  108.           The next step is to build a database dictionary.
  109.            
  110.  
  111.           Database Dictionaries
  112.  
  113.           After you have  decided what it  is you want your  application to
  114.           do,  you should  design your  database dictionary.   In  short, a
  115.           database dictionary is nothing more than data about data.  
  116.           There are several advantages  to using a database  dictionary but
  117.           the single largest advantage is the ability to allow your various
  118.           functions  to communicate with  each other.   i.e. UdfOne() might
  119.           only  need one index file for a particular database, but UdfTwo()
  120.           needs  several index  files.   By  using  a database  dictionary,
  121.           UdfOne() will open all  the index files and maintain them so they
  122.           are  current for  the next  time UdfTwo()  gets called  and vice-
  123.           versa.
  124.  
  125.           When using the Vern Six's Clipper ToolBox the database dictionary
  126.           will contain the following information about each database...
  127.  
  128.                1)   default path to the actual DBF file,
  129.                2)   whether or not the  application is allowed to re-create
  130.                     a missing DBF file,
  131.                3)   field  definitions  (data  type,  length,  description,
  132.                     etc),
  133.                4)   default field values,
  134.                5)   field picture statements  (for use  with @  SAY ..  GET
  135.                     statements, etc)
  136.                6)   index file names, order and keys
  137.  
  138.           You should design  your database  dictionary in such  a way  that
  139.           data within your application is not stored in multiple locations.
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.           For  example, you  probably  would  not  want to  store  customer
  148.           addresses  with each invoice, but rather, you would store them in
  149.           a customer file and  point to them from  within the invoice  file
  150.           with the use  of an external  key.  The  customer number in  this
  151.           case would be consider an external key.  
  152.  
  153.           The  entire datbase  dictionary  is contained  in three  database
  154.           files  (remember...   it's  merely  data  about   data).    These
  155.           dictionary  files are  listed  below with  their associated  file
  156.           structures and index keys.
  157.  
  158.  
  159.           ┌──────────────────────────────┐ ┌──────────────────────────────┐
  160.           │ _DictHdr.DBF File Structure  │ │ _DictFld.Dbf File Structure  │
  161.           │ # Field Name Type  Len   Dec │ │ # Field Name Type  Len   Dec │
  162.           ├──────────────────────────────┤ ├──────────────────────────────┤
  163.           │ 1 DBF_NAME     C     8    0  │ │ 1 DBF_NAME     C     8    0  │
  164.           │ 2 DESC         C    40    0  │ │ 2 FIELD_NMBR   C     3    0  │
  165.           │ 3 CREATE       L     1    0  │ │ 3 FIELD_NAME   C    10    0  │
  166.           │ 4 PATH         C    60    0  │ │ 4 FIELD_TYPE   C     1    0  │
  167.           ├──────────────────────────────┤ │ 5 FIELD_LEN    N     3    0  │
  168.           │Index:                        │ │ 6 FIELD_DEC    N     3    0  │
  169.           │ _DictHdr.Ntx: DBF_NAME       │ │ 7 DESC         C    40    0  │
  170.           └──────────────────────────────┘ │ 8 DEFAULT      C    60    0  │
  171.           ┌──────────────────────────────┐ │ 9 PICTURE      C    60    0  │
  172.           │ _DictNtx.DBF File Structure  │ ├──────────────────────────────┤
  173.           │ # Field Name Type  Len   Dec │ │Index:                        │
  174.           ├──────────────────────────────┤ │ _DictFld: DBF_NAME+FIELD_NMBR│
  175.           │ 1 DBF_NAME     C     8    0  │ │ _DictFl2: DBF_NAME+FIELD_NAME│
  176.           │ 2 ORDER        C     2    0  │ └──────────────────────────────┘
  177.           │ 3 NTX_NAME     C     8    0  │
  178.           │ 4 TYPE         C     1    0  │
  179.           │ 5 KEY          C    80    0  │
  180.           ├──────────────────────────────┤
  181.           │Index:                        │
  182.           │ _DictNtx: DBF_NAME+ORDER     │
  183.           └──────────────────────────────┘
  184.  
  185.  
  186.           These  dictionary  database  files  must  be  available  to  your
  187.           application at  run  time  as  several functions  in  Vern  Six's
  188.           Clipper  ToolBox will be  accessing them.   These databases allow
  189.           not  only  different functions  within  the  same application  to
  190.           communicate  amongst  themselves,   they  also  allow  completely
  191.           different  applications   to  communicate.     Example:   If  one
  192.           application  is  an   Accounts  Receivable  system   and  another
  193.           application is  a form letter  generator, they could  both access
  194.           the same customer file via these database dictionary databases.  
  195.  
  196.           NOTE: You can set an environment variable to point to a different
  197.           directory  if you do not  want your database  dictionary files in
  198.           the current directory.  Example: "SET DATADICT=C:\DATADICT\"
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.           Database Dictionary Maintenance Utility
  207.  
  208.           Vern Six's Clipper Toolbox comes with its own database dictionary
  209.           maintenance utility  called Maint.Exe.   This utility  will allow
  210.           you to  quickly  and  easily  create and  maintain  your  datbase
  211.           dictionary.   Of course,  you could also  create these dictionary
  212.           databases with something like DBU.EXE or the like, but you really
  213.           should  be using MAint.Exe since  it has some  other features and
  214.           will ensure data  itegrity, etc.  by not allowing  you to  forget
  215.           something or create something incorrectly.
  216.  
  217.           The main  screen  within Maint.Exe  is  a pick  list  of all  the
  218.           databases in your application (figure 1).  The following keys are
  219.           active from this main screen...
  220.  
  221.  
  222.                     F1   - Help
  223.                     F4   - Copy
  224.                     F5   - Renumber 
  225.                     F6   - Print Structure
  226.                     F7   - Generate *.CH Files
  227.                     F8   - Define Fields
  228.                     F9   - Define Indexs
  229.                     F10  - Edit Header Information
  230.                     Ins  - Create Database
  231.                     Del  - Delete Database
  232.  
  233.  
  234.           Create Database / Edit Header Information
  235.  
  236.           Pressing either [Insert] or the [F10] key will take to the screen
  237.           shown in figure  2.  If you pressed the [Insert] key, you will be
  238.           prompted for information about the new database you are creating.
  239.           If  you pressed [F10]  you will be  able to edit  the information
  240.           associated with the currently highlighted database.
  241.  
  242.           In either case, you  will be prompted for the  name, description,
  243.           re-create setting,  and default path for  the specified database.
  244.           The  answers to these queries should be self explanatory with the
  245.           exception  of the default path.  You would normally want to leave
  246.           this field blank  if you are going to be running your application
  247.           in the same directory as your database files.  Note: The user can
  248.           override  the  default path  setting  by  setting an  environment
  249.           variable such as  "SET CUST=C:\DATA\ACCT\"
  250.  
  251.           After you have provided this basic information about the database
  252.           file, you will be returned to the main screen of Maint.Exe.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.           Define Fields
  261.  
  262.           You can create the actual database structure by pressing the [F8]
  263.           key  from the  Maint.Exe main  pick list.   This  will cause  the
  264.           structure pick list to be  presented (figure 3).  From here,  you
  265.           can press the [Insert] key  to add a new field, the  [Delete] key
  266.           to delete  a  field,  or the  [F10]  key to  edit  the  currently
  267.           selected field.
  268.  
  269.           When you either create or edit a field, you will  be taken to the
  270.           screen shown  in figure 4.   Each  field is  described in  detail
  271.           below...
  272.  
  273.           Nmbr  is a programmer defined field that should contain the field
  274.           number.  I  suggest that you number your fields  in increments of
  275.           five  or ten so you can come back to this database and insert new
  276.           fields  in between  existing fields.   You  should pad  Nmbr with
  277.           zeros on the left.
  278.  
  279.           Field Name  is the actual name  of the field and  must conform to
  280.           Clipper's  field naming conventions.   Field Name must  be in all
  281.           upper case.
  282.  
  283.           Type is the field type  and must conform to Clipper's  field type
  284.           conventions.    The  valid choices  are...  C  -  Character, N  -
  285.           Numeric, L -  Logical, D - Date, M - Memo.   Type must also be in
  286.           upper case.
  287.  
  288.           Length is  a numeric value  representing the entire  field length
  289.           (including any decimals points, etc.)
  290.  
  291.           Dec is a  numeric value that represents  the number of digits  to
  292.           the right of the decimal place.  Dec  is only valid for fields of
  293.           Type N - Numeric.
  294.  
  295.           Description  is a  programmer  defined description  of what  this
  296.           field is  for.  You should  try to be descriptive as  this is the
  297.           same  field the  users will  see when  they build  an interactive
  298.           query.
  299.  
  300.           Default  Value is  a  programmer defined  default value  that VSG
  301.           (Vern  Six's  Code Generator)  will place  in  the field  when it
  302.           creates a "new" record.  The value  you place here must be of the
  303.           same  type as  the field  itself.   i.e.  strings have  to be  in
  304.           quotes, etc.
  305.  
  306.           Picture Clause  is a programmer  defined picture clause  that VSG
  307.           will use when displaying/editing this field.  The value you place
  308.           here must be  "stringified".   i.e. a picture  statement of  9999
  309.           must be written as "9999".
  310.  
  311.           NOTE: You  can  also  reference the  default  value  and  picture
  312.           statement  in your own programs  through the use  of the database
  313.           dictionary "include" files (see Pre-Processor below).
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.           Pressing  [Escape]  from the  "database  fields"  pick list  will
  322.           return you to the Maint.Exe main screen/pick list.
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.           Define Indexs
  331.  
  332.           You can define the  various index files that are  required within
  333.           your application(s) by pressing  the [F9] key from  the Maint.Exe
  334.           main  pick list.   This  will  cause the  index pick  list to  be
  335.           presented (figure 5).  From here, you can press the  [Insert] key
  336.           to add a new index, the [Delete] key  to delete an index file, or
  337.           the [F10] key to edit the currently selected index.
  338.  
  339.           When  you either create or edit an  index file, you will be taken
  340.           to the  screen shown  in figure  6.  Each  field is  described in
  341.           detail below...
  342.  
  343.           Index  FileName is  a  character field  that  should contain  the
  344.           actual name of the index file.   Do not put the NTX  extension on
  345.           the end of this filename.
  346.  
  347.           Order is a character field that is used to determine the order in
  348.           which the index  files will be  opened.  This  field should be  a
  349.           number padded on the left with a zero (if needed).
  350.  
  351.           Type is  a character field  that should contain  the type  of the
  352.           index key.  N - Numeric, C - Character, D - Date, L - Logical
  353.  
  354.           Key  is  the  actual index  key  expression.    You should  place
  355.           parenthesis around keys that are  "simple" in nature (one field).
  356.           While you  are entering this field, you can press the [F5] key to
  357.           select a field from a list.
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.           Delete Database
  366.  
  367.           Pressing  the [Delete] key at  the Maint.Exe main  pick list will
  368.           delete the currently highlighted database.   You will be prompted
  369.           to ensure  this is really what you  want to do.   Once you delete
  370.           the database, there is no way to recover it.
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.           Generate *.CH Files - Preprocessor
  379.  
  380.           Maint.Exe will generate "include" files  for use in your programs
  381.           and  especially  for  use  in  VSG (Vern  Six's  Code  Generator)
  382.           generated programs.  In general, you should generate the database
  383.           dictionary include files after you have defined all the databases
  384.           in  your  application  and   WHENEVER  you  change  the  database
  385.           dictionary.  To generate  the include files, press [F7]  from the
  386.           main pick list in Maint.Exe.
  387.  
  388.           A sample include file might look like this...
  389.  
  390.  
  391.           * Filename......: CUST.CH
  392.                  *
  393.                  * Author........: Vernon E. Six, Jr.
  394.                  *
  395.                  * Last Update...: 10/20/91  21:34:45
  396.                  *
  397.                  * Notice........: Copyright (c) 1991 by Vernon E. Six, Jr.
  398.                  *                 All Rights Reserved World Wide
  399.                  *
  400.                  * Purpose.......: Data Dictionary DEFINEs for CUST.DBF
  401.  
  402.  
  403.                  #DEFINE  _DEF_CUST_CODE                          SPACE(5)
  404.                  #DEFINE  _DEF_CUST_NAME                          SPACE(35)
  405.                  #DEFINE  _DEF_CUST_ADDR1                         SPACE(35)
  406.                  #DEFINE  _DEF_CUST_ADDR2                         SPACE(35)
  407.                  #DEFINE  _DEF_CUST_ZIP                           SPACE(5)
  408.                  #DEFINE  _DEF_CUST_PHONE                         SPACE(14)
  409.                  #DEFINE  _DEF_CUST_CONTACT                       SPACE(30)
  410.                  #DEFINE  _DEF_CUST_COMMENTS                      SPACE(50)
  411.                  #DEFINE  _DEF_CUST_LAST_PYMT                     DATE()
  412.                  #DEFINE  _DEF_CUST_PYMT_AMT                      0
  413.                  #DEFINE  _DEF_CUST_CURR_BAL                      0
  414.                  #DEFINE  _DEF_CUST_PAST_DUE30                    0
  415.                  #DEFINE  _DEF_CUST_PAST_DUE60                    0
  416.                  #DEFINE  _DEF_CUST_PAST_DUE90                    0
  417.                  #DEFINE  _DEF_CUST_BALANCE                       0
  418.                  #DEFINE  _DEF_CUST_TTL_PYMTS                     0
  419.                  #DEFINE  _DEF_CUST_TTL_CHGS                      0
  420.                  #DEFINE  _DEF_CUST_ACCT_LOCK                     .F.
  421.  
  422.  
  423.                  #DEFINE  _PIC_CUST_CODE                          "!!!!!"
  424.                  #DEFINE  _PIC_CUST_NAME                          REPLICATE("X",35)
  425.                  #DEFINE  _PIC_CUST_ADDR1                         REPLICATE("X",35)
  426.                  #DEFINE  _PIC_CUST_ADDR2                         REPLICATE("X",35)
  427.                  #DEFINE  _PIC_CUST_ZIP                           REPLICATE("X",5)
  428.                  #DEFINE  _PIC_CUST_PHONE                         "(999) 999-9999"
  429.                  #DEFINE  _PIC_CUST_CONTACT                       REPLICATE("X",30)
  430.                  #DEFINE  _PIC_CUST_COMMENTS                      REPLICATE("X",50)
  431.                  #DEFINE  _PIC_CUST_LAST_PYMT                     "99/99/99"
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.                  #DEFINE  _PIC_CUST_PYMT_AMT                      "9999.99"
  440.                  #DEFINE  _PIC_CUST_CURR_BAL                      "9999999.99"
  441.                  #DEFINE  _PIC_CUST_PAST_DUE30                    "9999999.99"
  442.                  #DEFINE  _PIC_CUST_PAST_DUE60                    "9999999.99"
  443.                  #DEFINE  _PIC_CUST_PAST_DUE90                    "9999999.99"
  444.                  #DEFINE  _PIC_CUST_BALANCE                       "9999999.99"
  445.                  #DEFINE  _PIC_CUST_TTL_PYMTS                     "9999999.99"
  446.                  #DEFINE  _PIC_CUST_TTL_CHGS                      "9999999.99"
  447.                  #DEFINE  _PIC_CUST_ACCT_LOCK                     "Y"
  448.  
  449.  
  450.                  The following is a sample program that uses this include file...
  451.  
  452.  
  453.                  * Filename......: AddCust.Prg
  454.                  *
  455.                  * Author........: Vernon E. Six, Jr.
  456.                  *
  457.                  * Last Update...: Thu  10-24-1991  19:27:49
  458.                  *
  459.                  * Notice........: Copyright (c) 1991 by Vernon E. Six, Jr.
  460.                  *                 All Rights Reserved World Wide
  461.                  *
  462.                  *
  463.                  * Dialect.......: Clipper v5.01
  464.  
  465.                  #include "INKEY.CH"
  466.                  #include "CUST.CH"
  467.  
  468.                  FUNCTION AddCust()
  469.                  *****
  470.                  * Simple routine to demonstrate use of data dictionary and related functions
  471.                  * for dCUG() "Saturday Gang"
  472.                  *****
  473.                  LOCAL getlist      := {}
  474.                  LOCAL c_CustCode   := _DEF_CUST_CODE
  475.                  LOCAL l_AcctLock   := _DEF_CUST_ACCT_LOCK
  476.                  LOCAL c_Name       := _DEF_CUST_NAME
  477.                  LOCAL c_Addr1      := _DEF_CUST_ADDR1
  478.                  LOCAL c_Addr2      := _DEF_CUST_ADDR2
  479.                  LOCAL c_Zip        := _DEF_CUST_ZIP
  480.                  LOCAL c_Phone      := _DEF_CUST_PHONE
  481.                  LOCAL c_Contact    := _DEF_CUST_CONTACT
  482.                  LOCAL c_Comments   := _DEF_CUST_COMMENTS
  483.  
  484.  
  485.                     //
  486.                     // Open the customer database
  487.                     //
  488.                     IF .NOT. VS_OpenDbf( "CUST" )
  489.                        VS_Die( PADC("Which Way Did It Go?",40),PADC("Which Way Did It Go?",40) )
  490.                     ENDIF
  491.  
  492.                     VS_NewScrn()
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.                     @ 05,05 SAY "Customer Code:   " GET c_CustCode PICTURE _PIC_CUST_CODE
  501.                     @ 06,05 SAY "Account Locked?  " GET l_AcctLock PICTURE _PIC_CUST_ACCT_LOCK
  502.  
  503.                     @ 10,05 SAY "Street Address:  " GET c_Addr1    PICTURE _PIC_CUST_ADDR1
  504.                     @ 11,05 SAY "Box, suite, etc: " GET c_Addr2    PICTURE _PIC_CUST_ADDR2
  505.                     @ 12,05 SAY "Zip Code:        " GET c_Zip      PICTURE _PIC_CUST_ZIP
  506.  
  507.                     @ 15,05 SAY "Telephone:       " GET c_Phone    PICTURE _PIC_CUST_PHONE
  508.                     @ 16,05 SAY "Contact:         " GET c_Contact  PICTURE _PIC_CUST_CONTACT
  509.  
  510.                     @ 20,05 SAY "Cmts: "            GET c_Comments PICTURE _PIC_CUST_COMMENTS
  511.  
  512.                     READ
  513.  
  514.  
  515.                     BEGIN SEQUENCE
  516.  
  517.                        IF LASTKEY() = K_ESC
  518.                           BREAK
  519.                        ENDIF
  520.  
  521.                        IF .NOT. CUST->( VS_AddRec() )
  522.                           BREAK
  523.                        ENDIF
  524.  
  525.                        REPLACE CUST->CODE       WITH c_CustCode
  526.                        REPLACE CUST->ACCT_LOCK  WITH l_AcctLock
  527.                        REPLACE CUST->NAME       WITH c_Name
  528.                        REPLACE CUST->ADDR1      WITH c_Addr1
  529.                        REPLACE CUST->ADDR2      WITH c_Addr2
  530.                        REPLACE CUST->ZIP        WITH c_Zip
  531.                        REPLACE CUST->PHONE      WITH c_Phone
  532.                        REPLACE CUST->CONTACT    WITH c_Contact
  533.                        REPLACE CUST->COMMENTS   WITH c_Comments
  534.  
  535.                        CUST->( dbUnlock() )
  536.  
  537.                     END SEQUENCE
  538.  
  539.                     dbCloseAll()
  540.  
  541.                  RETURN(NIL)
  542.                  *** EOF: AddCust() **********************************************************
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.           Print Structure
  551.  
  552.           Pressing the [F6]  key at  the main pick  list in Maint.Exe  will
  553.           cause  the  file  structure  and  index keys  for  the  currently
  554.           selected  database to be  printed to the  printer on  LPT1:.  You
  555.           will be prompted for the printer name, etc.
  556.  
  557.  
  558.           Renumber
  559.  
  560.           Pressing the  [F5] key at  the main pick  list in  Maint.Exe will
  561.           cause Maint.Exe to assign  new sequence numbers to the  fields in
  562.           the currently selected database.  This is most commonly used when
  563.           you  have added  several  new  fields  to  a  database  and  have
  564.           exhausted the number of fields you can insert between two fields.
  565.           i.e.   If you need to  insert a field between  field number "005"
  566.           and field  number "006",  you  could not  do it.   Renumber  will
  567.           spread  these  tightly  grouped  fields  apart  again.   In  this
  568.           example,  5 would  remain as  5 and  6 would  become 10,  7 would
  569.           become 15, 8 would be come 20, etc.
  570.            
  571.  
  572.           Copy
  573.  
  574.           Pressing  [F4]  will allow  you  to copy  the  currently selected
  575.           database structure  and index keys  to a new  database structure,
  576.           etc.   This is  useful for when  you create a  database and later
  577.           need a similar database that only requires a few modifications to
  578.           the structure.
  579.  
  580.           WARNING!!  If you copy a database, you have also copied the index
  581.           file names, keys, etc.  Be  sure to edit the index files for  the
  582.           new database, or  you will  have two databases  sharing an  index
  583.           file.   This is most certainly a  one way ticket to ErrorSys() at
  584.           runtime.
  585.  
  586.